import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { WorkBook } from './workbook.entity';
import { WorkSheet } from './worksheet.entity';

@Injectable()
export class ExcelService {
  constructor(
    @InjectRepository(WorkBook)
    private workBookRepository: Repository<WorkBook>,
    @InjectRepository(WorkSheet)
    private workSheetRepository: Repository<WorkSheet>,
  ) {}

  async findAll(): Promise<WorkBook[]> {
    let result = await this.workBookRepository
      .createQueryBuilder()
      .getMany();
    return result;
  }
  async addExcel(params){
    console.log(params)
  }
}